<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>

<table class="t_css table01" width="100%" border="0" cellpadding="0" id="basicInfo"  style="table-layout:fixed;"
	cellspacing="1">
	<col style="width:18%"/>
	<col style="width:16%"/>
	<col style="width:16%"/>
	<col style="width:18%"/>
	<col style="width:16%"/>
	<col style="width:16%"/>
	<tr class="li_1">
		<td   colspan="6" class="t_bar2">${param.title}</td>
		
	</tr>
	<tr class="li_2">
		<td   align="right" ><span class="color_red">*</span>工程中心名称：</td>
		<td  colspan="5">
			<input id="zh_title" name="proposal/zh_title" label="${param.title}-->工程中心名称" type="text" required class="input_css required maxlength:100"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />"/> 
		</td>
	</tr>
	<tr class="li_1">
		<td   align="right" ><span class="color_red">*</span>通讯地址：</td>
		<td  colspan="5">
			<input  name="proposal/address" label="${param.title}-->通讯地址" type="text" required class="input_css required maxlength:100"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/address" />"/> 
		</td>
	</tr>
	<tr class="li_2">
	    <td   align="right" ><span class="color_red">*</span>网址：</td>
		<td  colspan="5">
			<input  name="proposal/website" label="${param.title}-->网址" type="text" required class="input_css required maxlength:150"  style="width: 725px;" maxlength="150" value="<x:out select="$xmlData/data/proposal/website" />"/>
		</td>
	</tr>
	<tr class="li_1">
		<td   align="right"  nowrap="nowrap"><span class="color_red">*</span>市、厅级工程中心组建时间：</td>
		<td  colspan="2">
			<c:set var="build_date"><x:out select="$xmlData/data/proposal/build_date" /></c:set>
			<cpt:date id="build_date" name="proposal/build_date" value="${build_date}" className="required date  dateCompare:build_finish_date" label="${param.title}-->市、厅级工程中心组建时间" ></cpt:date> 
		</td>
		
		
		<td   align="right"  nowrap="nowrap"><span class="color_red">*</span>组建完成时间：</td>
		<td  colspan="2">
			<c:set var="build_finish_date"><x:out select="$xmlData/data/proposal/build_finish_date" /></c:set>
			<cpt:date id="build_finish_date" name="proposal/build_finish_date" value="${build_finish_date}" className="required date " label="${param.title}-->组建完成时间" ></cpt:date> 
		</td>
	
	</tr>
	
	
	
	
	<tr class="li_1">
	<td align="right"><span class="color_red">*</span>技术领域：</td>

		<td colspan="2">
			 <c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
			<c:set var="sub"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>
			<c:set var="researcharea_all_value"><x:out select="$xmlData/data/proposal/researcharea_all_value" /></c:set>
			<c:set var="researcharea">{'id':'<x:out select="$xmlData/data/proposal/researcharea_all_value" />','name':'<x:out select="$xmlData/data/proposal/researcharea_all_name" />'}</c:set>
			<c:if test="${empty researcharea_all_value }"><c:set var="researcharea">{'id':'<x:out select="$xmlData/data/proposal/researcharea_value" />','name':'<x:out select="$xmlData/data/proposal/researcharea_name" />'}</c:set></c:if>
          	<cpt:tree key="researcharea1" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${researcharea}"  label="${param.title}-->技术领域"
          		id="researcharea" onlyChooseLeaf="true" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="localInitTreeValue" sqlParamVal="{grant_code:${sub},stat_year:${param.statYear }}"/>
	        <input id="researcharea_value" type="hidden" name="proposal/researcharea_value" class="required" label="${param.title}-->技术领域" value="<x:out select="$xmlData/data/proposal/researcharea_value" />"/>
            <input id="researcharea_name" type="hidden" name="proposal/researcharea_name"  value="<x:out select="$xmlData/data/proposal/researcharea_name" />"/>
             <input id="researcharea_all_name" type="hidden" name="proposal/researcharea_all_name"  value="<x:out select="$xmlData/data/proposal/researcharea_all_name" />"/>
			 <input  type="hidden" id="researcharea_all_value" name="proposal/researcharea_all_value"  value="<x:out select="$xmlData/data/proposal/researcharea_all_value" />"/>
	</td>








	<td align="right"><span class="color_red">*</span>组建方式：</td>
	<td nowrap  colspan="2" valign="middle">
	<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="build_style" label="独立组建" value="01"/><span style="vertical-align: middle;">独立组建</span></label>&nbsp; &nbsp; &nbsp;  
	<label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="build_style" label="联合组建" value="02"/><span style="vertical-align: middle;">联合组建</span></label>&nbsp; &nbsp; &nbsp; 
	<input type="hidden" name="proposal/build_style_value" id="build_style_value" class="required" value="<x:out select="$xmlData/data/proposal/build_style_value" />" label="${param.title}-->组建方式" /> 
	<input type="hidden" name="proposal/build_style_name" id="build_style_name" value="<x:out select="$xmlData/data/proposal/build_style_name" />" label="${param.title}-->组建方式" />

	</tr>
	




	
	
	<tr class="li_2">
	<td  align="right" nowrap><span class="color_red">*</span>项目开始日期：</td>
		<td colspan="2">
			<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date" /></c:set>
			<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className="required date  dateCompare:end_date" label="${param.title}-->项目开始日期" ></cpt:date> 
		</td>
		<td  align="right" nowrap ><span class="color_red">*</span>项目结束日期：</td>
		<td colspan="2">
			<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date" /></c:set>
			<cpt:date id="end_date" name="proposal/end_date" className="required date" label="${param.title}-->项目结束日期"  value="${end_date}" ></cpt:date> 
		</td>
	</tr>
	<tr class="li_1">
	    <td  align="right" ><span class="color_red">*</span>申报日期：</td>
		<td colspan="2">
			<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="${param.title}-->申报日期"></cpt:date> 
		</td>
		
		
		<td align="right"><span class="color_red">*</span>邮政编码：</td>
		<td colspan="2">
			<input  name="proposal/zip_code" label="${param.title}-->邮政编码" type="text" required class="input_css required" maxlength="6"   value="<x:out select="$xmlData/data/proposal/zip_code" />"/>
		</td>
		
		
		
		
	</tr>
	</table>
	<br/>
	<script type="text/javascript">
	function localInitTreeValue(treeId, treeNode) {
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label")
					+ messageTip.researchAreaInvalidDisciplineCode);
			return false;
		}
		var showName = "";
		var parentId="";
		if (obj != null) {
		    str = obj.name + "-" + str;
			//obj = obj.parentNode;
			showName = obj.name;
			parentId=obj.id;
			//$("#" + treeId).parents("tr").find("[name$='domain_value']").val(treeNode.id);
			//$("#" + treeId).parents("tr").find("[name$='subject_no']").val(str.split("_")[1]);
		//	$("#" + treeId).parents("tr").find("[name$='domain_name']").text(treeNode.name.split("_")[0]);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(parentId);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(showName);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_name'],[id$='" + treeId + "_all_name']").val(str);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_value'],[id$='" + treeId + "_all_value']").val(treeNode.id);
		}else{
			//$("#"+treeId).parents("tr").find("[name$='domain_value']").val("");
			//$("#"+treeId).parents("tr").find("[name$='subject_no']").val("");
		    //$("#"+treeId).parents("tr").find("[name$='domain_name']").text("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_name'],[id$='" + treeId + "_all_name']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_value'],[id$='" + treeId + "_all_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
		}
		$("#" + treeId).val(str);
 }
  function setEmptyValueForTree(id){
	    //$("#"+id).parents("tr").find("[name$='domain_value']").val("");
		//$("#"+id).parents("tr").find("[name$='subject_no']").val("");
		//$("#"+id).parents("tr").find("[name$='domain_name']").text("");
		$("#" + id).parents("td").find("[name$='" + id + "_all_name'],[id$='" + id + "_all_name']").val("");
		$("#" + id).parents("td").find("[name$='" + id + "_all_value'],[id$='" + id + "_all_value']").val("");
		$("#"+id).val("");
		$("#"+id+"_hideId").val("");
		$("#"+id+"_hideName").val("");
		$("#"+id+"_code").val("");
		$("#"+id+"_value").val("");
		$("#"+id+"_name").val("");
		$("#"+id + ",[name$='/"+id+"_code']" + ",[name$='/"+id+"_name'],[name$='/"+id+"_value']").val("");
	}
	</script>